<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:note="http://note"
     xmlns:subnote="http://subnote"
     xmlns:xi="http://www.w3.org/2001/XInclude">

  <xsl:template match="/note:shiporder">
    <html>
      <head>
        <title>Order #<xsl:value-of select="/note:shiporder/@orderid"/></title>
      </head>
      <body>
        <xsl:apply-templates select="note:infosets"/>
        <h2>Items:</h2>
        <ul>
          <xsl:apply-templates select="note:item"/>
        </ul>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="note:infosets">
    <h2>Infosets:</h2>
    <ul>
      <xsl:apply-templates/>
    </ul>
  </xsl:template>

  <xsl:template match="note:infoset">
    <li>
      <a>
        <xsl:attribute name="href">
          <xsl:value-of select="xi:include/@xi:href"/>
        </xsl:attribute>
        Infoset #<xsl:value-of select="position()"/>: <xsl:value-of select="xi:include/@xi:href"/>
      </a>
    </li>
  </xsl:template>

  <xsl:template match="note:item">
    <li>Item #<xsl:value-of select="position()"/>:<br/>
      <xsl:apply-templates/>
    </li>
  </xsl:template>

  <xsl:template match="note:title">
    title:     <xsl:value-of select="."/><br/>
  </xsl:template>

  <xsl:template match="note:address">
    note:      <xsl:value-of select="."/><br/>
  </xsl:template>

  <xsl:template match="note:quantity">
    quantity:  <xsl:value-of select="."/><br/>
  </xsl:template>

  <xsl:template match="note:price">
    price:  <xsl:value-of select="."/><br/>
  </xsl:template>

  <xsl:template match="*|@*|node()|text()">
  </xsl:template>

</xsl:stylesheet>
